/*
 *
 *  ------------------------------------------------------------------
 *  Copyright © 2017 Hangzhou DtDream Technology Co.,Lt d. All rights reserved.
 *  ------------------------------------------------------------------
 *        Product:  EMR
 *    Module Name: NEZHA
 *   Date Created: 17-10-23 下午4:22
 *    Description:
 *  ------------------------------------------------------------------
 *  Modification History
 *  DATE            Name           Description
 *  ------------------------------------------------------------------
 *  2017-10-23      NEZHA EMR
 *  ------------------------------------------------------------------
 * /
 */

package org.xukai.remoting.sdk.web.monitor;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import java.util.Date;

/**
 * Created by moriarty on 17-7-17.
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class TaskData {

    private long taskId;
    private int index;
    private int attempt;
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSz")
    private Date launchTime;
    private String executorId;
    private String host;
    private String taskLocality;
    private boolean speculative;
    private String errorMessage;

    public long getTaskId() {
        return taskId;
    }

    public int getIndex() {
        return index;
    }

    public int getAttempt() {
        return attempt;
    }

    public Date getLaunchTime() {
        return launchTime;
    }

    public String getExecutorId() {
        return executorId;
    }

    public String getHost() {
        return host;
    }

    public String getTaskLocality() {
        return taskLocality;
    }

    public boolean isSpeculative() {
        return speculative;
    }

    public String getErrorMessage() {
        return errorMessage;
    }
}
